home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / catD / cvsema.z / cvsema
Encoding:
Text File  |  1998-10-30  |  2.8 KB  |  67 lines

  1.  
  2.  
  3.  
  4. ccccvvvvsssseeeemmmmaaaa((((DDDD3333XXXX))))                                                        ccccvvvvsssseeeemmmmaaaa((((DDDD3333XXXX))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _cccc_vvvv_ssss_eeee_mmmm_aaaa - conditionally perform a "V" or wait semaphore operation
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _""""_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_""""
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _""""_ssss_yyyy_ssss_////_ssss_eeee_mmmm_aaaa_...._hhhh_""""
  14.  
  15.      _cccc_vvvv_ssss_eeee_mmmm_aaaa_((((_ssss_eeee_mmmm_aaaa______tttt _****_s_e_m_a_p_))))_;;;;
  16.  
  17.    AAAArrrrgggguuuummmmeeeennnnttttssss
  18.      _s_e_m_a_p
  19.           Expects a pointer to the semaphore you want to conditionally.
  20.  
  21. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.      _cccc_vvvv_ssss_eeee_mmmm_aaaa routine conditionally performs a "V" operation depending on the
  23.      current value of the semaphore. If the semaphore value is strictly less
  24.      than 0, _cccc_vvvv_ssss_eeee_mmmm_aaaa increments the semaphore value by 1 and wakes up a
  25.      sleeping process.  Otherwise, _cccc_vvvv_ssss_eeee_mmmm_aaaa simply returns. _cccc_vvvv_ssss_eeee_mmmm_aaaa effectively
  26.      performs a "V" operation if there is a process asleep on the semaphore;
  27.      otherwise, it does nothing. To initialize semaphores before you use them,
  28.      call _iiii_nnnn_iiii_tttt_nnnn_ssss_eeee_mmmm_aaaa(D3X) or _iiii_nnnn_iiii_tttt_nnnn_ssss_eeee_mmmm_aaaa______mmmm_uuuu_tttt_eeee_xxxx(D3X).
  29.  
  30.    RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
  31.      _cccc_vvvv_ssss_eeee_mmmm_aaaa returns 1 if the semaphore value is less than 0 and a process is
  32.      awakened. Otherwise _cccc_vvvv_ssss_eeee_mmmm_aaaa returns 0.
  33.  
  34.    SSSSeeeeeeee AAAAllllssssoooo
  35.      _iiii_nnnn_iiii_tttt_nnnn_ssss_eeee_mmmm_aaaa(D3X), _iiii_nnnn_iiii_tttt_nnnn_ssss_eeee_mmmm_aaaa______mmmm_uuuu_tttt_eeee_xxxx(D3X), _vvvv_ssss_eeee_mmmm_aaaa(D3X)
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.